<?php
	
	require_once '../../controller/relatorios/' . basename(__FILE__);
	
	$options = array();
	$options['searchGrid']  = FALSE; 
	$options['editColumn']  = FALSE;
	$options['checkColumn'] = FALSE;
	$options['footer']      = FALSE;
	
	$d = new TDataTableVagasContrato( $contrato->contratoid, $options );
	
    $html = '<table cellpadding="0" cellspacing="0" border="0" width="100%">
    				<tr>
    					<td valign="top" width="34%">
    						<table style="font-size:0.9em !important;">
        						<tr>
                        			<td>Contrato ID:</td>
                        			<td><b>' . $contrato->contratoid . '</b></td>
                        		</tr>
                        		<tr>
                        			<td>No. &Oacute;rg&atilde;o:</td>
                        			<td><b>' . $contrato->numeroorgao . '</b></td>
                        		</tr>
                        		<tr>
                        			<td>No. SIOF:</td>
                        			<td><b>' . $contrato->numerosiof . '</b></td>
                        		</tr>   
                        		<tr>
                        			<td>No. Aditivo:</td>
                        			<td><b>' . $numeroAditivo . '</b></td>
                        		</tr>                      		                  			
                    		</table>
                		</td>
                		<td valign="top" width="33%">
                			<table style="font-size:0.9em !important;">                				
                				<tr>
                        			<td>&Oacute;rg&atilde;o:</td>
                        			<td><b>' . $orgao->sigla . '</b></td>
                        		</tr>
                        		<tr>	
                        			<td>Empresa:</td>
                        			<td><b>' . $empresa->fantasia . '</b></td>
                        		</tr>
                        		<tr>	
                        			<td>Valor Mensal:</td>
                        			<td><b>' .$contrato->getValorMensal() . '</b></td>
                    			</tr>  
                        		<tr>	
                        			<td>Valor Total:</td>
                        			<td><b>' . $contrato->getValorGlobal() . '</b></td>
                    			</tr>
                    			
                    		</table>
                		</td>
                		<td valign="top" width="33%">
                			<table style="font-size:0.9em !important;">
                    			<tr>
                        			<td>Vagas Licitadas:</td>
                        			<td><b>' . $vagasLicitadas . '</b></td>
                    			</tr>
                    			<tr>
                        			<td>Vagas N&atilde;o Lotadas:</td>
                        			<td><b>' . $vagasNaoLotadas . '</b></td>
                    			</tr>
                    			<tr>
                        			<td>Vagas Lotadas:</td>
                        			<td><b>' . $vagasLotadas . '</b></td>
                        		</tr>
                        	</table>
                		</td>
                	</tr>
    			</table>
    			<br/>
    			<table cellpadding="0" cellspacing="0" border="0" width="100%" style="font-size:0.9em !important;">
    				<tr>	
            			<td>Situa&ccedil;&atilde;o do contrato: <b>' . $status->descricao . '</b></td>            			
            		</tr>
            		<tr>	
            			<td>Motivos do Aditivo: <b>' . $motivos. '</b></td>            			
            		</tr>
    			</table>
        		
        		<h3>Vagas:</h3>
        		<div  style="font-size:0.9em !important;">' . $d->render() . '</div>';
    
    $relatorio = new TRelatorio();
	$relatorio->setTitle('Relatório do Contrato');
	$relatorio->setContent($html);
	$relatorio->setPDFName('relatorioContrato' . $contrato->contratoid);
	$relatorio->setPDFPaper('landscape');
	$relatorio->render();
	
?>